#ifndef LIBRARY_STRINGCOMPARATOR_H
#define LIBRARY_STRINGCOMPARATOR_H

#include "comparator.h"

namespace Library
{

class StringComparator : public Comparator<const String *>
{
	public:
						StringComparator() : Comparator<const String *>() {};
		virtual			~StringComparator() {};

		virtual int32	compare(const String * left, const String * right);

		virtual bool8	equals(const String * left, const String * right);

	// prohibited
	private:
		StringComparator(Comparator<const String *> &);
		StringComparator & operator=(Comparator<const String *> &);
};


inline int32
StringComparator::compare(const String * left, const String * right)
{
	return left->compare(*right);
}

inline bool8
StringComparator::equals(const String * left, const String * right)
{
	return (bool8)(left->compare(*right) == 0);
}

}; // namespace Library

#endif
